package com.usian.feign;

import com.usian.pojo.TbContent;
import com.usian.pojo.TbContentCategory;
import com.usian.pojo.TbItemCat;
import com.usian.utils.AdNode;
import com.usian.utils.CateGroup;
import com.usian.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "usian-content-service")
public interface ContentFeign {
    @RequestMapping("selectContentCategoryByParentId")
    public List<TbContentCategory> selectContentCategoryByParentId(@RequestParam Integer id);
    @RequestMapping("insertContentCategory")
    public int insertContentCategory(@RequestParam Integer parentId,@RequestParam String name);
    @RequestMapping("deleteContentCategoryById")
    public void deleteContentCategoryById(@RequestParam long categoryId);
    @RequestMapping("updateContentCategory")
    public int updateContentCategory(@RequestParam Integer id,@RequestParam String name);
    @RequestMapping("selectItemCategoryByParentId")
    public List<TbItemCat> selectItemCategoryByParentId(@RequestParam Integer id);
    @RequestMapping("selectTbContentAllByCategoryId")
    public PageResult selectTbContentAllByCategoryId(@RequestParam long categoryId);
    @RequestMapping("insertTbContent")
    public int insertTbContent(@RequestBody TbContent tbContent);
    @RequestMapping("deleteContentByIds")
    public int deleteContentByIds(@RequestParam long ids);
    @RequestMapping("selectFrontendContentByAD")
    public List<AdNode> selectFrontendContentByAD();
}
